import React from 'react'
import { NavLink } from 'react-router-dom'
import * as API from '../../uitls/mainPageApi'
class List extends React.Component {
    constructor() {
        super()
        this.state = {

        }
    }

    render() {
        let { item } = this.props
        // console.log(${ API.HTTPAPI + item.shop_photo_url });item.shop_photo_url.length < 10 ? 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2523032856,715213314&fm=26&gp=0.jpg' : `api1${item.shop_photo_url}`
        return (
            /* html */
            <NavLink className='store-li' to={`/Home/ShopDetails?shop_id=${item.shop_id}`}>
                <div className='store-fengmian'><img src={'http://172.16.10.144:8881' + item.shop_photo_url} alt="" />
                    <div className={item.shop_status ? 'working-fengmian' : 'rest-fengmian'}>
                        打烊中
                    </div>
                </div>
                <div className='store-info flex-column'>
                    <div className='store-name'>{item.shop_name}</div>
                    <div className='store-row flex-row'>
                        <div className='store-lv'>
                            <div><span className='iconfont icon-pingfen-xing'></span><span className='text-14'>{item.lv}</span>
                            </div>
                            <div className='text-12'>
                                月售 11223 份
                               </div>
                        </div>
                        <div className='store-2r-right text-12'>
                            <span>35 分钟</span>
                            <span>{item.location}m</span>
                        </div>

                    </div>
                    <div className='store-set flex-row text-12'>
                        <div>
                            <span>{item.shop_status ? '营业中' : '休息中'}</span>
                            <span> {item.shop_start_price}元起送</span>
                            <span> {item.shop_delivery_money}元配送费</span>
                        </div>

                        {this.props.children}

                    </div>

                </div>
            </NavLink>
        )
    }
}

export default List